<!DOCTYPE html>
<html lang="es">
  <head>
    <title>Salesianas María Reina </title>
	<?php require_once('common/top.php');?>

      <!-- Main hero unit for a primary marketing message or call to action -->
      <div class="row" >
      	
     

   
     <div class="span12" id="records">
 
   		<h2 class="text-center" id="<?php echo $idcronica;?>"><?php echo $titulo;?></h2>
        
        <?php if ($partido1["goles_local"] > $partido1["goles_visitante"]) {?>
			<p class="lead text-success" 
		<?php }else if ($partido1["goles_local"] < $partido1["goles_visitante"]){?>
			<p class="lead text-error" 
		<?php }else { ?>
			<p class="lead " 
		<?php }?>
        
        style="margin:0px"><a  style="color:inherit" href="../futbol/<?php echo ($equipo1["nombre"]); echo('_');echo ($equipo1["id_equipo"]);?>"><?php echo $equipo1["nombre"]?></a><?php ;echo " ";echo $dep; echo " "; echo $partido1["goles_local"];echo " - ";echo $partido1["goles_visitante"];echo " "; echo $partido1["rival"];?></p>
        <p class="text-right" style="margin:0px"><small><?php echo $fechahora ?>h</small></p>
        <hr >
        <p><?php echo $contenido;?></p>
        
       <hr>
       <?php if ($listComments != NULL){?>
       <section id="libro">
            	<div class="block-header"><h5>Comentarios</h5></div>
                <div class="well" style="max-height : 500px; overflow : auto; " id="todoscomentarios">
                
            					    <?PHP
										  		$count=1;
										  		foreach ($listComments as $comment) {
												$idComentario=$comment['id_comentario'];
												$autor=$comment['autor'];
												$comentario=$comment['comentario'];
												$fechahora=getFecha($comment['fecha']);
												$ncoment=$count;
												$count++;
												?>
                                                
                               <div class="row-fluid"> 
                               <div class="span12">
                             	 <div id="comentario<?php echo($idComentario);?>" name"comentario<?php echo($idComentario);?>" class="clearfix control-group">
                              	 <div ><p  id="c<?php echo($ncoment);?>" name="c<?php echo($ncoment);?>" style="color:#990011">#<?php echo($ncoment); echo " ";?><strong> <?php echo $autor;?></strong><small> escribió:</small></p>
                                  <div  class="span2 pull-right" style="font-size:10px"><?php echo($fechahora);?> </div>
                                    </div>
                                   
          <?PHP  echo ($comentario); ?>
                                                        
							</div>
                                                          </div>
                                                        </div>
                                                          <hr/> 
                                                        <?php } ?>
                                                    
                                                        </div>
             </section>
             <?php } ?>
             <div >
                           <a href="javascript;" class="btn btn-danger pull-left" id="buttcomment" onClick="$('#escribecoment').slideToggle('slow');return false">Comentar</a>
                           </div>
                   
                       
                         <br />
                         <br />
							<div  class="row" id="escribecoment" style="display:none">
								<div class="span9">
									<div class="row">
										<div class="span12"> 
											<div class="block-header"><h4>Escribe un comentario</h4></div>
                                            <div class="well">
                                            <form action="addcomment" method="post" name="rate" class="form" enctype = "multipart/form-data">
                                            <input type="text" class="span3" placeholder="Nombre"  name="autor"/> 
                                          
                                             <p>Caracteres: <span id="char_count2"></span></p>    
     <textarea id="textocomentario" class="span8 textinput textInput" name="textocomentario" maxlength="300" onFocus="countChars('textocomentario','char_count2',300)" onKeyDown="countChars('textocomentario','char_count2',300)" onKeyUp="countChars('textocomentario','char_count2',300)" style="resize:none" ></textarea>                              
 <SCRIPT >
												function countChars(textbox, counter, max) {
												  var count = max - document.getElementById(textbox).value.length;
												  if (count < 0) { document.getElementById(counter).innerHTML = "<span style=\"color: red;\">" + count + "</span>"; }
												  else { document.getElementById(counter).innerHTML = count; }
												}
												</script>
                                             <input type="hidden" value="<?php echo($idequipo1);?>" name="idequipo"/>  
                                             <input type="hidden" value="<?php echo($idcronica);?>" name="idcronica"/>
                                             <input type="hidden" value="<?php echo($url);?>" name="url"/> 
                                             <input type="hidden" value="0" name="esfirma"/> 
                                     <br />
                                             <input name="enviarcoment" type="submit"  onclick="" class="btn btn-danger btn-action" id="" value="Enviar"/>   
                                             </form>
                                             </div>
                       					</div><!--span12-->
                       				 </div><!--row-->
                       			 </div><!--span12-->
                        	</div><!--row-->
 

   
</div>

</div>
	

<?php include('common/bottom.php');?>